package com.hckjsec.official.service.impl;

import java.util.List;
import com.hckjsec.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.official.mapper.OfficialRecruitMapper;
import com.hckjsec.official.domain.OfficialRecruit;
import com.hckjsec.official.service.IOfficialRecruitService;

/**
 * 公司招聘Service业务层处理
 * 
 * @author cyt
 * @date 2021-12-10
 */
@Service
public class OfficialRecruitServiceImpl implements IOfficialRecruitService 
{
    @Autowired
    private OfficialRecruitMapper officialRecruitMapper;

    /**
     * 查询公司招聘
     * 
     * @param id 公司招聘ID
     * @return 公司招聘
     */
    @Override
    public OfficialRecruit selectOfficialRecruitById(Long id)
    {
        return officialRecruitMapper.selectOfficialRecruitById(id);
    }

    /**
     * 查询公司招聘列表
     * 
     * @param officialRecruit 公司招聘
     * @return 公司招聘
     */
    @Override
    public List<OfficialRecruit> selectOfficialRecruitList(OfficialRecruit officialRecruit)
    {
        return officialRecruitMapper.selectOfficialRecruitList(officialRecruit);
    }

    /**
     * 新增公司招聘
     * 
     * @param officialRecruit 公司招聘
     * @return 结果
     */
    @Override
    public int insertOfficialRecruit(OfficialRecruit officialRecruit)
    {
        officialRecruit.setCreateTime(DateUtils.getNowDate());
        return officialRecruitMapper.insertOfficialRecruit(officialRecruit);
    }

    /**
     * 修改公司招聘
     * 
     * @param officialRecruit 公司招聘
     * @return 结果
     */
    @Override
    public int updateOfficialRecruit(OfficialRecruit officialRecruit)
    {
        officialRecruit.setUpdateTime(DateUtils.getNowDate());
        return officialRecruitMapper.updateOfficialRecruit(officialRecruit);
    }

    /**
     * 批量删除公司招聘
     * 
     * @param ids 需要删除的公司招聘ID
     * @return 结果
     */
    @Override
    public int deleteOfficialRecruitByIds(Long[] ids)
    {
        return officialRecruitMapper.deleteOfficialRecruitByIds(ids);
    }

    /**
     * 删除公司招聘信息
     * 
     * @param id 公司招聘ID
     * @return 结果
     */
    @Override
    public int deleteOfficialRecruitById(Long id)
    {
        return officialRecruitMapper.deleteOfficialRecruitById(id);
    }
}
